package com.ujoku.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.labillusion.core.util.jsonFormat.SimpleDoubleSerializer;

import java.util.Date;

/**
 * Created by greg.chen on 14-10-20.
 */
public class Member {
    private int user_id;
    private String user_name;
    private String nickname;
    private String email;

    @JsonIgnore
    private String webWxId;
    private boolean webIdSet;

    @JsonIgnore
    private String appWxId;
    private boolean appIdSet;

    @JsonIgnore
    private String password;

    @JsonIgnore
    private String pay_password;

    private boolean default_pay_password;

    @JsonIgnore
    private String security_code;

    private boolean default_security_code;

    private String real_name;
    private Short gender;
    private Date birthday;
    private Date reg_time;
    private int orderCount;
    private int favCount;
    private int cellarCount;
    private String phone_mob;

    private int level;
    private String levelName;
    private String nextLevelName;
    @JsonSerialize(using = SimpleDoubleSerializer.class)
    private Double upgradeCost;
    @JsonSerialize(using = SimpleDoubleSerializer.class)
    private Double discount;
    @JsonSerialize(using = SimpleDoubleSerializer.class)
    private Double balance;
    private int onSaleCount;
    private int friendCount;

    private Address primaryAddress;

    @JsonIgnore
    private Date updateTime;

    private int salesCount;

    private int scores;

    private String ascription;

    private Boolean status;

    private String createBy;

    private String updateBy;

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Address getPrimaryAddress() {
        return primaryAddress;
    }

    public void setPrimaryAddress(Address primaryAddress) {
        this.primaryAddress = primaryAddress;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    private String headPortraitUrl;
    private boolean portrait;

    private int unreadCounts;

    private String iOSDeviceToken;

    private boolean IMUser;

    public int getUnreadCounts() {
        return unreadCounts;
    }

    public void setUnreadCounts(int unreadCounts) {
        this.unreadCounts = unreadCounts;
    }

    public String getHeadPortraitUrl() {
        return headPortraitUrl;
    }

    public void setHeadPortraitUrl(String headPortraitUrl) {
        this.headPortraitUrl = headPortraitUrl;
    }

    public boolean isPortrait() {
        return portrait;
    }

    public void setPortrait(boolean portrait) {
        this.portrait = portrait;
    }

    public int getFriendCount() {
        return friendCount;
    }

    public void setFriendCount(int friendCount) {
        this.friendCount = friendCount;
    }

    public int getOnSaleCount() {
        return onSaleCount;
    }

    public void setOnSaleCount(int onSaleCount) {
        this.onSaleCount = onSaleCount;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public String getLevelName() {
        return levelName;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    public int getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(int orderCount) {
        this.orderCount = orderCount;
    }

    public int getFavCount() {
        return favCount;
    }

    public void setFavCount(int favCount) {
        this.favCount = favCount;
    }

    public int getCellarCount() {
        return cellarCount;
    }

    public void setCellarCount(int cellarCount) {
        this.cellarCount = cellarCount;
    }

    public Date getReg_time() {
        return reg_time;
    }

    public void setReg_time(Date reg_time) {
        this.reg_time = reg_time;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public Short getGender() {
        return gender;
    }

    public void setGender(Short gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getPhone_mob() {
        return phone_mob;
    }

    public void setPhone_mob(String phone_mob) {
        this.phone_mob = phone_mob;
    }

    public String getNextLevelName() {
        return nextLevelName;
    }

    public void setNextLevelName(String nextLevelName) {
        this.nextLevelName = nextLevelName;
    }

    public Double getUpgradeCost() {
        return upgradeCost;
    }

    public void setUpgradeCost(Double upgradeCost) {
        this.upgradeCost = upgradeCost;
    }

    public String getWebWxId() {
        return webWxId;
    }

    public void setWebWxId(String webWxId) {
        this.webWxId = webWxId;
    }

    public String getAppWxId() {
        return appWxId;
    }

    public void setAppWxId(String appWxId) {
        this.appWxId = appWxId;
    }

    public String getPay_password() {
        return pay_password;
    }

    public void setPay_password(String pay_password) {
        this.pay_password = pay_password;
    }

    public boolean isDefault_pay_password() {
        return default_pay_password;
    }

    public void setDefault_pay_password(boolean default_pay_password) {
        this.default_pay_password = default_pay_password;
    }

    public String getSecurity_code() {
        return security_code;
    }

    public void setSecurity_code(String security_code) {
        this.security_code = security_code;
    }

    public boolean isDefault_security_code() {
        return default_security_code;
    }

    public void setDefault_security_code(boolean default_security_code) {
        this.default_security_code = default_security_code;
    }

    public boolean isWebIdSet() {
        if(this.webWxId == null || this.webWxId == "")
            return false;
        else
            return true;
    }

    public boolean isAppIdSet() {
        if(this.appWxId == null || this.appWxId == "")
            return false;
        else
            return true;
    }

    public String getiOSDeviceToken() {
        return iOSDeviceToken;
    }

    public void setiOSDeviceToken(String iOSDeviceToken) {
        this.iOSDeviceToken = iOSDeviceToken;
    }

    public boolean isIMUser() {
        return IMUser;
    }

    public void setIMUser(boolean IMUser) {
        this.IMUser = IMUser;
    }

    public int getSalesCount() {
        return salesCount;
    }

    public void setSalesCount(int salesCount) {
        this.salesCount = salesCount;
    }

    public int getScores() {
        return scores;
    }

    public void setScores(int scores) {
        this.scores = scores;
    }

    public String getAscription() {
        return ascription;
    }

    public void setAscription(String ascription) {
        this.ascription = ascription;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }
}
